package com.rf.richfitwheel.admin.sys.dao;

import com.rf.richfitwheel.admin.sys.model.UserMngOrg;
import com.rf.richfitwheel.admin.sys.model.UserMngOrgExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserMngOrgMapper {
    long countByExample(UserMngOrgExample example);

    int deleteByExample(UserMngOrgExample example);

    int deleteByPrimaryKey(String id);

    int insert(UserMngOrg record);

    int insertSelective(UserMngOrg record);

    List<UserMngOrg> selectByExample(UserMngOrgExample example);

    UserMngOrg selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") UserMngOrg record, @Param("example") UserMngOrgExample example);

    int updateByExample(@Param("record") UserMngOrg record, @Param("example") UserMngOrgExample example);

    int updateByPrimaryKeySelective(UserMngOrg record);

    int updateByPrimaryKey(UserMngOrg record);
    
    List<Map<String, Object>> selectUserMngOrgByUserHasParentName(String userId);
    
    /**
     * 查询管辖某个机构的人员
     * @param orgId 机构id
     * @return 用户列表
     */
    List<Map<String, Object>> getMngUsersListByOrgId(String orgId);
}